package java6699.lesson01;
public class Person6699 {
    private String name;
    public Person6699(String name) {
        this.name = name;
    }
    public Person6699() {
    }
    /**
     * 购物
     *
     * @param market6699 market6699
     * @param name       名字
     * @return {@link Product6699}
     * 重写shopping方法，返回单个name
     */
    public Product6699 shopping(Market6699 market6699,String name){
        return market6699.sell(name);
    }

    /**
     * 购物
     *
     * @param market6699  market6699
     * @param productList 产品列表
     * @return {@link String}
     * 重写shooping方法，以列表的形式，返回多个name
     */
    public String shopping(Market6699 market6699,Product6699[] productList){
        return market6699.sell(productList);
    }
    @Override
    public String toString() {
        return "Person6699{" +
                "name='" + name + '\'' +
                '}';
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}